<%
var headContent = {
include("/pages/template/head.html"){}
%>

<script type="text/javascript">
    var oper;
    jQuery(function($) {
        // 页面方法
        oper = {
            width : 450,
            height : 500,
            form : document.form1,
            list : function() {
                var url = 'system/accountrecord/list';
                this.form.action = url;
                this.form.submit();
            }
        };
        //显示Menu索引
        showMenu('page_system');
        showMenu('page_customerinfo');
    });

    //分页
    var paginator = function(page) {
        oper.list();
    };

</script>

<%
};

var bodyContent = {
%>
<form name="form1" action="" method="post"  class="form-inline" role="form">
	<!-- 菜单 -->
	<% include("/pages/template/menu.html"){} %>

	<div class="tableSearch">
		<%  //查询列表 %>
		<div class="form-group">
			<input class="form-control" type="text" name="attr.customerId" value="${attr.customerId!''}"
				   placeholder="请输入客户名称" required='required' />
		</div>
		<div class="form-group">
			<input class="form-control" type="text" name="attr.createName" value="${attr.createName!''}"
				   placeholder="请输入操作人"  />
		</div>

		<button type="button" class="btn btn-default" onclick="oper.list();" name="search">
			<span class="glyphicon glyphicon-search"></span> 查 询
		</button>
		<button type="button" class="btn btn-default" onclick="resetForm();">
			<span class="glyphicon glyphicon-refresh"></span> 重 置
		</button>
		<button type="button" class="btn btn-default" onclick="oper.add();">
			<span class="glyphicon glyphicon-plus"></span> 新 增
		</button>
	</div>

	<!-- 数据列表 -->
	<table class="table table-striped table-bordered table-hover">
		<thead>
		<tr>
			<th>序号</th>
			<%  // 列表头部 %>
			<th name="customerName" class="sorting">客户名称</th>
			<th name="createtime" class="sorting">充值时间</th>
			<th name="amount1" class="sorting">充值金额(元)</th>
			<th name="amount2" class="sorting">赠送金额(元)</th>
			<th name="currentAmount" class="sorting">现充值总金额(元)</th>
			<th name="currentGive" class="sorting">现赠送总余额(元)</th>
			<th name="remark" class="sorting">价款用途</th>
			<th name="createName" class="sorting">操作人</th>
		</tr>
		</thead>
		<tbody>
		<% for(item in page.list){ %>
		<tr>
			<td>${itemLP.index }</td>
			<%  // 列表内容 %>
			<td>${item.customerName}</td>
			<td>${item.createtime}</td>
			<td>${item.amount1}</td>
			<td>${item.amount2}</td>
			<td>${item.currentAmount}</td>
			<td>${item.currentGive}</td>
			<td>${item.remark}</td>
			<td>${item.createName}</td>
		</tr>
		<% } %>
		</tbody>
	</table>
	<%include("/pages/includes/paginator.html"){} %>
</form>
<%}; %>


<% layout("/pages/template/_layout.html",{head:headContent,body:bodyContent}){ %>
<%} %>